package com.happyclub.pojo;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;

/**
 * @author 高欢
 * @description 用户意见反馈处理中间表
 * @date 2019/4/4
 */
@Entity
@Table(name = "TB_ADVICE_SHENHE", schema = "SCOTT")
@EntityListeners(AuditingEntityListener.class)
public class TbAdviceShenhe implements Serializable {
    private String id;
    private String adviceId;
    private String judge;
    private String response;
    private String contactWayShenhe;
    private Date responseTime;
    private Date updateTime;

    @Id
    @Column(name = "ID")
    @GenericGenerator(name="idGenerator", strategy="uuid") //这个是hibernate的注解/生成32位UUID
    @GeneratedValue(generator="idGenerator")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "ADVICE_ID")
    public String getAdviceId() {
        return adviceId;
    }

    public void setAdviceId(String adviceId) {
        this.adviceId = adviceId;
    }

    @Basic
    @Column(name = "JUDGE")
    public String getJudge() {
        return judge;
    }

    public void setJudge(String judge) {
        this.judge = judge;
    }

    @Basic
    @Column(name = "RESPONSE")
    public String getResponse() {
        return response;
    }

    public void setResponse(String response) {
        this.response = response;
    }

    @Basic
    @Column(name = "CONTACT_WAY_SHENHE")
    public String getContactWayShenhe() {
        return contactWayShenhe;
    }

    public void setContactWayShenhe(String contactWayShenhe) {
        this.contactWayShenhe = contactWayShenhe;
    }

    @Basic
    @Column(name = "RESPONSE_TIME")
    public Date getResponseTime() {
        return responseTime;
    }

    public void setResponseTime(Date responseTime) {
        this.responseTime = responseTime;
    }

    @Basic
    @Column(name = "UPDATE_TIME")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbAdviceShenhe that = (TbAdviceShenhe) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(adviceId, that.adviceId) &&
                Objects.equals(judge, that.judge) &&
                Objects.equals(response, that.response) &&
                Objects.equals(contactWayShenhe, that.contactWayShenhe) &&
                Objects.equals(responseTime, that.responseTime) &&
                Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, adviceId, judge, response, contactWayShenhe, responseTime, updateTime);
    }
}
